from selenium.webdriver.common.by import By

from web_practice.wework_po.page_object.base_page import BasePage
from web_practice.wework_po.utils.log_util import logger


class IndexPage(BasePage):
    # 添加成员 链接
    _TEXT_ADDMEMEBER = (By.CSS_SELECTOR, ".ww_indexImg_AddMember")
    def goto_addcontact(self):
        """跳转到添加成员页"""
        # 1. 点击添加成员
        # 2. 跳转
        logger.info("点击添加成员按钮")
        self.find_and_click(self._TEXT_ADDMEMEBER)
        from web_practice.wework_po.page_object.add_member_page import AddMemberPage
        return AddMemberPage(self.driver)